import 'dart:ui';

import 'package:fluttertoast/fluttertoast.dart';

class ToastUtils {

  ToastUtils._();

  ///toast
  static showToast(String string) {
    Fluttertoast.showToast(msg: string,backgroundColor: Color(0x5f000000));
  }

  static bool toast(String msg, {bool? error = true}) {
    if (error != null && error) {
      showToast(msg);
      return true;
    }
    return false;
  }

  static bool emptyToast(String? text, String msg) {
    if (text == null || text.length == 0) {
      showToast(msg);
      return true;
    }
    return false;
  }
}
